package com.hbsi.demo1;

/**
 * @author 程奕红
 * @version 1.0
 */
public class TicketWindow extends Thread{
    private int tickets=20;

    @Override
    public void run() {
       while(true){
           if(tickets>0){
               System.out.println(this.getName()+"正在发售第"+tickets+"张票");
               tickets--;
           }
       }
    }
}
